﻿@model IEnumerable<FinancasMD.Models.Conta>

@{
    ViewBag.Title = "Conta";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Adicionar Conta", "Adicionar", null, new { @class = "btn btn-primary" })
</p>
<table>
    <tr>
        <th>@Html.DisplayNameFor(model => model.Descricao)</th>
        <th>@Html.DisplayNameFor(model => model.Valor)</th>
        <th>@Html.DisplayNameFor(model => model.DtVenvimento)</th>
        <th>@Html.DisplayNameFor(model => model.QtdParcelas)</th>
        <th>@Html.DisplayNameFor(model => model.TipoConta)</th>
        <th>@Html.DisplayNameFor(model => model.TipoParcela)</th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>@Html.TextBoxFor(modelItem => item.Descricao)</td>
        <td>@Html.TextBoxFor(modelItem => item.Valor)</td>
        <td>@Html.TextBoxFor(modelItem => item.DtVenvimento)</td>
        <td>@Html.TextBoxFor(modelItem => item.QtdParcelas)</td>
        <td>@Html.TextBoxFor(modelItem => item.TipoConta)</td>
        <td>@Html.TextBoxFor(modelItem => item.TipoParcela)</td>
        <td>
            @Html.ActionLink("Editar", "Editar", new { id = item.Id })
            @Html.ActionLink("Excluir", "Excluir", new { id = item.Id })
        </td>
    </tr>
}

</table>
